Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: reformat repo to new clang@1.4.0 #36628

Closed
wants to merge 1 commit into from
Closed

Conversation

josephperrott
Copy link
Member

@josephperrott josephperrott commented Apr 14, 2020

Upgrading to clang-format@1.4.0 would bring angular/angular to the latest available version of clang-format and include support for newer ts/js features like the ones noted in the background section. However because the previous version of the clang-format the angular/angular repository was pinned to, 1.0.41, was nearly 4 years old the number of styling changes made by the formatter was greater than desired. After running the new version of clang-format across the formatted code in angular/angular it was found that ~2500 files would be affected by the new formatting. At the time, the presumption was this was too large of a single change to land and instead the change would need to be able to be rolled out incrementally.

The gulp tasks which run the formatter were updated to only format files which were found to be changed between the current HEAD of a ref and its previous HEAD. This works out to be either all of the changes in a single PR being looked at, or all of the changes in a commit as it lands in a branch. This allowed for the updated formatting to only happen in files already changed by a PR, rather than changing all ~2500 files in one change and invalidating nearly every outstanding PR.

However it was found that this created more noise than expected in each PR and instead our best action was to reformat the remaining formatted files in the repo in a single commit.

Patch version of #36613

@josephperrott josephperrott added action: merge The PR is ready for merge by the caretaker PR target: patch-only merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Apr 14, 2020
@ngbot

This comment has been minimized.

@josephperrott
Copy link
Member Author

Caretaker: The lint failure is caused because the change is too large for gulpLint to process.

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: global-approvers
on behalf of Angular leads

atscott pushed a commit that referenced this pull request Apr 14, 2020
@atscott atscott closed this Apr 14, 2020
@josephperrott josephperrott deleted the new-clang-patch branch April 22, 2020 19:07
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants